new Test.Unit.Runner(
{
  testObjectNotPolluted: function() 
  {
    var iterations = 0, obj = { a: 1, b: 2, c: 3 };
    
    for (property in obj) 
      iterations++;
      
    this.assertEqual(3, iterations, "Object shouldn't be polluted");
  },
  
  test$: function() {
    var hardCandy = _C('hardCandyShell'), // contains a rich, chocolaty center
        HardCandy = _C('HardCandyShell'), // doesn't exist
        link      = _C('aLinkToHere'),    // is set to visibility:hidden        
        list      = _C('list'),           // is set to display:none 
        hcNode    = document.getElementById('hardCandyShell'),
        HcNode    = document.getElementById('HardCandyShell'),
        linkNode  = document.getElementById('aLinkToHere'),
        listNode  = document.getElementById('list'),
        array     = [hardCandy, link, HardCandy, list];
    
    // Ensure the elements that exist get returned and those that don't, don't.
    this.assertEqual(false, hardCandy == null);
    this.assertEqual(true, HardCandy == null); 
    this.assertEqual(false, link == null);
    this.assertEqual(false, list == null);
    
    // Ensure the elements retrieved match our expectation
    this.assertEqual(hardCandy.tagName.toLowerCase(), 'div');
    this.assertEqual(hardCandy.innerHTML, 'a rich, chocolaty center');
    this.assertEqual(link.tagName.toLowerCase(), 'p');
    this.assertEqual(list.tagName.toLowerCase(), 'ul');
    
    // Ensure that passing the native DOM node to $ is the 
    // same as passing the id of that node to $
    this.assertIdentical(_C(hcNode), hardCandy);
    this.assertIdentical(_C(document.getElementById('aLinkToHere')), link);
    this.assertIdentical(_C(document.getElementById('list')), list);
    
    var temp = _C(document.getElementById('HardCandyShell'));
    // Make sure this works for nodes that don't exist in the document too
    this.assertIdentical(temp, HardCandy);
    
    // Ensure that retrieving an array from IDs, 
    // DOM nodes, Elements and a mixture all work
    this.assertEnumEqual(array, 
      _C('hardCandyShell', 'aLinkToHere', 'HardCandyShell', 'list'));
    this.assertEnumEqual(array, _C(hcNode, linkNode, HcNode, listNode));
    this.assertEnumEqual(array, _C(hardCandy, link, HardCandy, list));
    this.assertEnumEqual(array, _C(hcNode, link, HcNode, 'list'));
  },
  
  test$Version: function() 
  {
    // Fixture version is generated during the build, so make sure we're
    // testing the right code (and that the $.Version variable exists)
    this.assertIdentical(_fixtureVersion, _C.Version);
  },
  
  test$EmptyFn: function() 
  {
    // Make sure it returns undefined
    this.assertUndefined(_C.EmptyFn());
     
    // Make sure that it always returns undefined, regardless of argument
    this.assertIdentical(_C.EmptyFn(32), _C.EmptyFn("not 32 by any stretch"));
  },
  
  test$IdFn: function() 
  {
    var items = [
      3, 
      false, 
      ['a','b','c'],
      "now, James!",
      undefined,
      null
    ];
    
    // IdFn should always return its argument untouched
    for(var i=0; i < items.length; i++)
      this.assertIdentical(items[i], _C.IdFn(items[i]));
  },
  
  test$Extend: function()
  {
    var object = {foo: 'foo', bar: [1, 2, 3]};
    
    this.assertIdentical(object, _C.extend(object));
    this.assertHashEqual({foo: 'foo', bar: [1, 2, 3]}, object);
    this.assertIdentical(object, _C.extend(object, {bla: 123}));
    this.assertHashEqual({foo: 'foo', bar: [1, 2, 3], bla: 123}, object);
    this.assertHashEqual({foo: 'foo', bar: [1, 2, 3], bla: null},
      _C.extend(object, {bla: null}));
  }
  
});